class Animal {

    private String name;
    private int age;


    String getName()
    {
        return name;
    }
    public void setName(String name){
        this.name=name;
    }

    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }

}
    class Deer extends Animal{
        private String color;
        private String favoritefood;
        public String getColor(){
            return color;
        }
        public void setColor(String color){
            this.color=color;
        }

        public String getFavoritefood(){
            return favoritefood;
        }
        public void setFavoritefood(String favoritefood){
            this.favoritefood=favoritefood;
        }
    }


    public class zoozoo{
        public static void main(String[] args) {
            Deer deer= new Deer();
            deer.setName("乔巴");
            deer.setAge(15);
            deer.setColor("黄色");
            deer.setFavoritefood("棉花糖");
            System.out.println("名称："+deer.getName()+",年龄："+deer.getAge()+",颜色: "+deer.getColor()+",喜欢的食物："+deer.getFavoritefood());
        }
    }
}
